package com.xiaoshuidi.cloud.module.report.service.finance;

import com.xiaoshuidi.cloud.framework.common.pojo.PageResult;
import com.xiaoshuidi.cloud.module.report.controller.finance.vo.ExportRespVO;
import com.xiaoshuidi.cloud.module.report.controller.finance.vo.OwnerDetailIncomePageReqVO;
import com.xiaoshuidi.cloud.module.report.controller.finance.vo.OwnerDetailIncomePageRespVO;
import com.xiaoshuidi.cloud.module.report.dal.DO.report.OwnerIncomeDetailReportDO;
import com.xiaoshuidi.cloud.module.report.dal.DO.report.OwnerIncomeSummaryReportDO;

import java.math.BigDecimal;
import java.util.List;

public interface OwnerIncomeDetailReportService {

    /**
     * 收入汇总明细 列表查询
     */
    PageResult<OwnerDetailIncomePageRespVO> detailIncomePage(OwnerDetailIncomePageReqVO reqVO);

    /**
     * 查询合同最近一笔的累计收入
     */
    OwnerIncomeDetailReportDO getRecentIncomeReport(Long contractId, String currentMonth);

    /**
     * 收入汇总表导出
     */
    ExportRespVO detailIncomeExport(OwnerDetailIncomePageReqVO req);

    void insertBatch(List<OwnerIncomeDetailReportDO> list);

    void updateBatch(List<OwnerIncomeDetailReportDO> list);


    long countDetailsInCurrentMonth(String currentMonth);

    List<OwnerIncomeDetailReportDO> selectDetailsInCurrentMonth(String currentMonth);

    List<OwnerIncomeDetailReportDO> selectDetailsInCurrentMonthInTurn(String currentMonth,Integer from,Integer pageSize);

    OwnerIncomeDetailReportDO selectDetailsByContractIdInCurrentMonth(Long contractId, String currentMonth);

    BigDecimal sumTotalRentAndWaterByContractId(Long contractId);

    List<OwnerIncomeDetailReportDO> selectDetailsInCurrentMonthAndContractIds(String currentMonth,List<Long> contractIds);

    List<OwnerIncomeSummaryReportDO> selectDetailsInCurrentMonthGroupByApartmentId(String currentMonth);
}
